From: user virtual Date: Tue, 25 Jan 2011 16:42:00 +0000 (+0000) Subject: tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10884 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=45244f3cd1716008b27a31957472d2abf71c55a1;p=xen.git tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd "xen-watchdog stop" attempts to kill non existing "watchdogd" but misses the running "xenwatchdogd". This also provokes errors during install and Debian package management. Signed-off-by: user virtual Acked-by: Ian Jackson Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/hotplug/Linux/init.d/xen-watchdog b/tools/hotplug/Linux/init.d/xen-watchdog index 620e8415d0..a5b3f6b961 100644 --- a/tools/hotplug/Linux/init.d/xen-watchdog +++ b/tools/hotplug/Linux/init.d/xen-watchdog @@ -17,6 +17,9 @@ ### END INIT INFO # +DAEMON=/usr/sbin/xenwatchdogd +base=$(basename $DAEMON) + # Source function library. if [ -e /etc/init.d/functions ] ; then . /etc/init.d/functions @@ -39,10 +42,9 @@ fi start() { local r - base="watchdogd" echo -n $"Starting domain watchdog daemon: " - /usr/sbin/xenwatchdogd 30 15 + $DAEMON 30 15 r=$? [ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup" echo @@ -52,10 +54,9 @@ start() { stop() { local r - base="watchdogd" echo -n $"Stopping domain watchdog daemon: " - killall -USR1 watchdogd 2>/dev/null + killall -USR1 $base 2>/dev/null r=$? [ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop" echo